<template>
  <div class="my-box">
    <div>
      <div class="my-img"><img src="@/assets/image/mymusic.png" alt="" /></div>
      <a @click="changelogin">立即登录</a>
      <Login ref="mylogin" />
    </div>

    
  </div>
</template>

<script>
import {mapState} from "vuex"
export default {
  mounted(){
    this.gomymusic()
  },
  methods: {
    // 修改提示框
    changelogin() {
      // this.dialogVisible = true
      this.$refs.mylogin.changeDialog();
    },
    gomymusic() {
      if(this.cookie){
        // console.log('sss');
        this.$router.push('/mymusic')
      }
    }
  },
   computed: {
    ...mapState({
      //cookie
      cookie: (state) => {
        return state.User.loginmessage.cookie;
      },
    }),
   }
};
</script>

<style lang="less" scoped>
.my-box {
  width: 984px;
  //   height: 500px;
  min-height: 600px;
  margin: auto;
  background-color: #fff;
  position: relative;
  .my-img {
    margin: auto;
    padding-top: 50px;
    // padding-top: 50px;
    overflow: hidden;
    width: 807px;
    height: 270px;
  }

  a {
    position: absolute;
    display: block;
    width: 167px;
    height: 45px;
    margin: 102px 0 0 482px;
    background-position: 0 9999px;
    text-indent: -9999px;
    top: 150px;
    right: 245px;
    background: url("~@/assets/image/mymusic.png") no-repeat 0 9999px;
  }
}
</style>
